<script setup>
import { defineProps, computed } from 'vue'
import { usernameStore } from '@/store/index.js'

const props = defineProps({
  title: String
})
const username = computed(() => usernameStore().username)
</script>

<template>
  <div class="order-header">
    <div class="container clearfix">
      <div class="header-logo">
        <a href=""></a>
      </div>
      <div class="title">
        <h3>
          {{ title }}
          <slot name="tip"></slot>
        </h3>
      </div>
      <div class="username">
        <a href="javascript:;">{{ username }}</a>
      </div>
    </div>
  </div>
</template>

<style lang="scss">
.order-header {
  padding: 30px 0;

  .header-logo {
    float: left;
  }

  .title,
  .username {
    display: inline-block;
    height: 55px;
    line-height: 55px;
  }

  .title {
    font-size: 28px;
    float: left;
    color: #333333;
    margin-left: 54px;

    span {
      font-size: 14px;
      margin-left: 17px;
      color: #999999;
      font-weight: bold;
    }
  }

  .username {
    float: right;

    a {
      color: #666666;
      font-size: 16px;
    }
  }
}
</style>
